package cn.top.listener;

import org.flowable.task.service.delegate.DelegateTask;
import org.flowable.task.service.delegate.TaskListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class FlowListener implements TaskListener {

    private static Logger log = LoggerFactory.getLogger(TaskListener.class);

    @Override
    public void notify(DelegateTask delegateTask) {
        log.info("执行了" + delegateTask.getEventName());

        if(EVENTNAME_CREATE.equals(delegateTask.getEventName())){
            delegateTask.setAssignee("lxt");
        }
    }
}
